﻿@{
    ViewBag.Title = "History";
    Layout = "~/Views/Shared/_LayoutList.cshtml";
}
@(Html.nbGridFor<DishRangeView>(s =>
{
    s.Action("HistoryList");
    s.Columns(c =>
    {
        c.Bind(m => m.Id).IsKey();
        c.BindDateTime(m => m.Date).Title("日期").AsSearch();
        c.Bind(m => m.MealType).Title("餐单分类").Width(50).AsSearch();
        c.BindEnum(m => m.MainMaterialType, "MaterialCategory").Title("主料分类").Width(50).AsSearch();
        c.BindEnum(m => m.Category, "DishType").Title("类别").Width(40).AsSearch();
        c.Bind(m => m.Name).Title("菜肴名称").Width(100).AsQuery().AsSearch().Align(GridAlign.Left);
        c.Bind(m => m.Cost).Title("成本(元)").Width(50).Align(GridAlign.Right).AsSearch();
        c.Bind(m => m.ItemDesc).Title("品名信息").Width("auto").Align(GridAlign.Left).AsQuery().AsSearch();
        c.BindDateTime(m => m.UpdateDate).Title("更新时间");
    });
}))